import React, { Component } from "react";

class CheckList extends Component {
  render() {
    let tasks = this.props.tasks.map((task) => (
      <li key={task.id} className="checkList_task">
        <input type="checkbox" defaultChecked={task.done}></input>
        {task.name}
        {/* <a href="javascript:;" className="checkList_task--remove"></a> */}
      </li>
    ));
    return (
      <div className="checkList">
        <ul>{tasks}</ul>
      </div>
    );
  }
}

export default CheckList;
